#include <stdio.h>
int main()
{
    double e=1.0, x=1.0, y, detax;    
    int i=1;

    printf("\n please input enter a detax:");
    scanf("%lf", &detax);
    y=1/x;
    while (y >= detax);
    {
        x = x * i;
        y = 1 / x;
        e = e + y;
        i++;
    } 

    printf("%d\n",i);
    printf("%12.10lf",e);
    
    return 0;
}  